<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>教师端--我要发布</title>
<script src="${basePath}js/jquery.js"></script>
<script src="${basePath}js/pintuer.js"></script>
<script type="text/javascript"
	src="http://apps.bdimg.com/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="${basePath}js/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}js/bootstrap-select.js"></script>
<link rel="stylesheet" type="text/css"
	href="${basePath}css/bootstrap-select.css">
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
	rel="stylesheet">
<script src="${basePath}js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(window).on('load', function() {
		$('.selectpicker').selectpicker({
			'selectedText' : 'cat'
		});
	});
</script>
<script type="text/javascript">
	(function($) {
		// tipWrap: 提示消息的容器
		// maxNumber: 最大输入字符
		$.fn.artTxtCount = function(tipWrap, maxNumber) {
			var countClass = 'js_txtCount',
			// 定义内部容器的CSS类名
			fullClass = 'js_txtFull',
			// 定义超出字符的CSS类名
			disabledClass = 'disabled'; // 定义不可用提交按钮CSS类名
			// 统计字数
			var count = function() {
				var btn = $(this).closest('form').find(':submit'), val = $(this)
						.val().length,
				// 是否禁用提交按钮
				disabled = {
					on : function() {
						btn.removeAttr('disabled').removeClass(disabledClass);
					},
					off : function() {
						btn.attr('disabled', 'disabled')
								.addClass(disabledClass);
					}
				};
				if (val == 0)
					disabled.off();
				if (val <= maxNumber) {
					if (val > 0)
						disabled.on();
					tipWrap
							.html('<span class="' + countClass + '">\u8FD8\u80FD\u8F93\u5165 <strong>'
									+ (maxNumber - val)
									+ '</strong> \u4E2A\u5B57</span>');
				} else {
					disabled.off();
					tipWrap
							.html('<span class="' + countClass + ' ' + fullClass + '">\u5DF2\u7ECF\u8D85\u51FA <strong>'
									+ (val - maxNumber)
									+ '</strong> \u4E2A\u5B57</span>');
				}
				;
			};
			$(this).bind('keyup change', count);
			return this;
		};
	})(jQuery);
	// demo
	jQuery(function() {
		// 批量
		$('.form-group').each(
				function() {
					$(this).find('#expObjective').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expEquip').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expContent').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expRequire').artTxtCount(
							$(this).find('.tips'), 1000);
				});

	});
</script>

<link rel="stylesheet" href="${basePath}css/pintuer.css">
<link rel="stylesheet" href="${basePath}css/admin.css">
</head>
<body>
	<div class="panel admin-panel">
		<div class="panel-head">
			<strong><span class="icon-pencil-square-o"></span> 我要发布</strong>
		</div>
		<div class="body-content">
			<form method="post" class="form-x" role="form"
				enctype="multipart/form-data" action="Expdetails.do">
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验名称：</label>
					</div>
					<div class="field">
						<input id="expName" type="text" class="input" name="expName" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>课程名称：</label>
					</div>
					<div class="field">
						<input id="expClass" type="text" class="input" name="expClass" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>课程代码：</label>

					</div>
					<div class="field">
						<input id="expId" type="text" class="input" name="expId" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验班级：</label>
					</div>
					<div class="field">
						<label for="id_select"></label> <select id="stuClass"
							name="stuClass" class="selectpicker bla bla bli" multiple
							data-live-search="true">
							<option id="10" value="10">电信1班</option>
							<option id="11" value="11">电信2班</option>
							<option id="12" value="12">电科1班</option>
							<option id="13" value="13">电科2班</option>
							<option id="14" value="14">电科3班</option>
							<option id="15" value="15">信息1班</option>
							<option id="16" value="16">信息2班</option>
							<option id="17" value="17">光电1班</option>
							<option id="18" value="18">光电2班</option>
							<option id="19" value="19">集成1班</option>
							<option id="20" value="20">集成2班</option>
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验教师：</label>
					</div>
					<div class="field">
						<input id="teaName" type="text" class="input" name="teaName" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验地点：</label>
					</div>
					<div class="field">
						<input id="expAdd" type="text" class="input" name="expAdd" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>开始时间：</label>
					</div>
					<div class="field">
						<input id="expBtime" type="text" class="input" name="expBtime" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>结束时间：</label>
					</div>
					<div class="field">
						<input id="expEtime" type="text" class="input" name="expEtime" />
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验目的：</label>
					</div>
					<div class="field">
						<textarea id="expObjective" type="text" class="input"
							name="expObjective" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验器材：</label>
					</div>
					<div class="field">
						<textarea id="expEquip" type="text" class="input" name="expEquip"
							style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验内容：</label>
					</div>
					<div class="field">
						<textarea id="expContent" type="text" class="input"
							name="expContent" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group">
					<div class="label">
						<label>实验要求：</label>
					</div>
					<div class="field">
						<textarea id="expRequire" type="text" class="input"
							name="expRequire" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<!-- ********************上传文件！！！！！******************************************************* -->
				<div class="form-group">
					<div class="label">
						<label>电子讲义：</label>
					</div>
					<div class="field">
						<input type="file" name="file" class="button bg-blue margin-left"
							id="file">
					</div>
				</div>
				<!-- *************************************************************************** -->
				<div class="form-group" id="submit">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit">
							提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>

</body>
</html>